package demo2.state;

import demo2.Order;
import demo2.Result;

/**
 * 订单状态
 * @author ZhouWeiBo
 * @create 2022/6/6
 */
public abstract class OrderState {
    /**
     * 生成订单
     */
    public abstract Result create(Order order);

    /**
     * 等待支付
     */
    public abstract Result waitForPay(Order order);

    /**
     * 支付成功
     */
    public abstract Result paySuccess(Order order);

    /**
     * 支付失败
     */
    public abstract Result payFail(Order order);

    /**
     * 订单完成
     */
    public abstract Result finish(Order order);

}
